using System;
using System.Collections.Generic;
using System.Text;

namespace RNChessBoard.RNChessRulesEngine.TestFixtures
{
    /// <summary>
    /// This class defines custom arrays for classic, known games and their outcomes
    /// in raw algebraic coordinates.
    /// </summary>
    /// <remarks>
    /// The strings for each move are structured in the following manner:
    /// "{white from}-{white to}/{white result}/{white move type}/
    /// {black from}-{black to}/{black result}/{black move type}"
    /// 
    /// To indicate the end of a game, ie. no more moves, the to/from string
    /// for either side may be replaced with "EOG", representing End Of Game.
    /// 
    /// {result} has the following expected values:
    /// "": Legal move, no immediate consequence
    /// "!": Illegal move
    /// "+": Move has placed opponent in check
    /// "++": Move has placed opponent in check mate
    /// 
    /// {move type} has the following expected values:
    /// "x": Capture
    /// "nc": Non-capturing move
    /// "O-O": King-side castle
    /// "O-O-O": Queen-side castle
    /// "xep": En-passant capture
    /// "!": Illegal move
    /// "^": Pawn promotion
    /// </remarks>
    class ClassicTestGames
    {
        // Capablanca vs. Mieses 1913
        public static string[] Capablanca_Mate_Mieses_1913 = new string[] 
            {
                "D2-D4//nc/G8-F6//nc",
                "G1-F3//nc/C7-C5//nc",
                "D4-D5//nc/D7-D6//nc",
                "C2-C4//nc/G7-G6//nc",
                "B1-C3//nc/F8-G7//nc",
                "E2-E4//nc/E8-G8//O-O",
                "F1-E2//nc/E7-E6//nc",
                "E1-G1//O-O/E6-D5//x",
                "E4-D5//x/F6-E8//nc",
                "F1-E1//nc/C8-G4//nc",
                "F3-G5//nc/G7-C3//x",
                "B2-C3//x/G4-E2//x",
                "D1-E2//x/E8-G7//nc",
                "G5-E4//nc/F7-F6//nc",
                "C1-F4//nc/G7-E8//nc",
                "F4-H6//nc/E8-G7//nc",
                "A1-D1//nc/B8-A6//nc",
                "D1-D3//nc/F6-F5//nc",
                "E4-G5//nc/A6-C7//nc",
                "E2-E7//nc/D8-E7//x",
                "E1-E7//x/C7-E8//nc",
                "D3-H3//nc/F5-F4//nc",
                "H6-G7//x/E8-G7//x",
                "H3-H7//x/G7-F5//nc",
                "E7-E6//nc/F8-E8//nc",
                "E6-G6/+/x/G8-F8//nc",
                "H7-F7/++/nc/EOG//"
            };

        public static string[] CRC_CoffeeHouse_WhiteToMate = new string[]
            {
                "D2-D4//nc/D7-D5//nc",
                "E2-E3//nc/E7-E6//nc",
                "G1-F3//nc/E6-E5//nc",
                "D4-E5//x/D5-D4//nc",
                "D1-D4//x/F7-F6//nc",
                "E5-F6//x/C7-C6//nc",
                "D4-E4/+/nc/E8-F7//nc",
                "F3-G5/+/nc/F7-F6//x",
                "E4-F4/+/nc/F6-G6//nc",
                "F1-D3/+/nc/D8-D3//x",
                "C2-D3//x/G6-H6//nc",
                "H2-H4//nc/H6-H5//nc",
                "G2-G4/+/nc/H5-H6//nc",
                "F4-D6/+/nc/G7-G6//nc",
                "B1-C3//nc/A7-A6//nc",
                "E3-E4//nc/A8-A7//nc",
                "C3-D5//nc/B7-B6//nc",
                "D5-F4//nc/A6-A5//nc",
                "D6-F6//nc/F8-A3//nc",
                "F6-F8/+/nc/A7-G7//nc",
                "F8-A3//x/G7-A7//nc",
                "A3-F8/+/nc/A7-G7//nc",
                "F8-F6//nc/B8-A6//nc",
                "B2-B4//nc/C8-B7//nc",
                "E1-F1//nc/B6-B5//nc",
                "C1-B2//nc/A5-B4//x",
                "F6-G7/++/x/EOG//"
            };

        public static string[] Golombek_Brown_Resigns_EPCapture = new string[]
            {
                "E2-E4//nc/G8-F6//nc",
                "E4-E5//nc/F6-D5//nc",
                "B1-C3//nc/D5-C3//x",
                "B2-C3//x/D7-D5//nc",
                "F2-F4//nc/E7-E6//nc",
                "G1-F3//nc/C7-C5//nc",
                "D2-D4//nc/B7-B6//nc",
                "F1-D3//nc/C8-A6//nc",
                "E1-G1//O-O/A6-D3//x",
                "D1-D3//x/C5-C4//nc",
                "D3-E2//nc/G7-G6//nc",
                "G2-G4//nc/H7-H5//nc",
                "F4-F5//nc/H5-G4//x",
                "F5-E6//x/G4-F3//x",
                "E2-F3//x/F7-F5//nc",
                "E5-F6//xep/F8-D6//nc",
                "C1-G5//nc/D8-C7//nc",
                "F6-F7/+/nc/E8-F8//nc",
                "F3-F6//nc/D6-H2/+/x",
                "G1-H1//nc/H2-E5/+/nc",
                "F6-H8//x/E5-H8//x",
                "E6-E7/+/nc/EOG//"
            };
    }
}
